import { domainService } from '~/config/server'
import { NetService } from '~/utils/net.service'
import { Inject, Debounce } from "~/core/decorator";

export class CustomerComplainService {

  @Inject(NetService)
  private netService: NetService

  /**
   * 查询客诉列表
   */
  public getCustomerComplainList(data,page?) {
    return this.netService.send({
      server: domainService.customerComplain.getCustomerComplainList,
      data,
      page,
      loading: true
    })
  }
  /**
   * 登记客诉-保存
   */
  public saveComplain(data,page?) {
    return this.netService.send({
      server: domainService.customerComplain.saveComplain,
      data,
      page,
      loading: true
    })
  }
  /**
   * 根据客户号查询客户姓名
   */
  public getCustNameById(data: any) {
    return this.netService.send({
      server: domainService.customerComplain.getCustNameById,
      data,
      loading: true
    })
  }
  /**
   * 查询投诉人员列表
   */
  public getComplainUserNameList(data: any,page?) {
    return this.netService.send({
      server: domainService.customerComplain.getComplainUserNameList,
      data,
      page,
    })
  }
  /**
   * 查询投诉外包公司列表
   */
  public getComplainCompanyNameList(data: any,page?) {
    return this.netService.send({
      server: domainService.customerComplain.getComplainCompanyNameList,
      data,
      page,
    })
  }
  /**
   * 查询历史跟进纪录
   */
  public getComplainHistoryList(data: any) {
    return this.netService.send({
      server: domainService.customerComplain.getComplainHistoryList,
      data,
    })
  }
  /**
   * 查询客诉信息（编辑）
   */
  public getCustomerComplainById(data: any) {
    return this.netService.send({
      server: domainService.customerComplain.getCustomerComplainById,
      data,
    })
  }

}
